<?php
/**
 * (logic) 解析报告数据（临时数据转换为正式数据）
 */

namespace App\Logic\MonthlyReport\ParseTmp;
class ParseWork
{
    public static function parse($model)
    {
        $date = date('Y-m-01',strtotime('midnight first day of -1 month'));
        $class = self::$_class[$model];
        $class::exeParse($date);
    }

    private static $_class = ['m-ads' => ParseAdsMonthly::class ,
                              'vbc' => ParseAdsVBC::class,
                              'dsp' => ParseAdsDSP::class,
                              'th-ads' => ParseThAds::class,
                              'th' => ParsePaymentThFee::class,
                              're' => ParsePaymentReFee::class,
                              'ic' => ParsePaymentIcFee::class,
                              'sa' => ParsePaymentSales::class,
                              'rebates' => ParsePaymentRebates::class,
                              'total' => ParsePaymentTotal::class,
                              'order' => ParsePaymentOrder::class,
                              'vat' => ParseVat::class,
                              'cplan' => ParsePaymentCPlanFee::class,
                              'common' => ParseCommonFee::class];
}
